//
//  SLShipImageDetailViewController.m
//  StarLight
//
//  Created by Duke.wu on 16/6/20.
//  Copyright © 2016年 Duke.Wu. All rights reserved.
//

#import "SLShipImageDetailViewController.h"

@interface SLShipImageDetailViewController ()
@property (nonatomic, strong) UIImageView *shipImageView;
@end

@implementation SLShipImageDetailViewController

- (void)viewDidLoad {
    [super viewDidLoad];
  self.view.backgroundColor = [UIColor whiteColor];
  
  [self.view addSubview:self.shipImageView];
  [self.shipImageView mas_makeConstraints:^(MASConstraintMaker *make) {
    make.edges.equalTo(self.view);
  }];
    // Do any additional setup after loading the view.
}

- (void)viewWillAppear:(BOOL)animated{
  [super viewWillAppear:animated];
  [self.navigationController setNavigationBarHidden:NO animated:YES];
}

- (void)setShipImage:(UIImage *)shipImage{
  _shipImage = shipImage;
  self.shipImageView.image = shipImage;
}

- (UIImageView *)shipImageView{
  if (!_shipImageView) {
    _shipImageView = [UIImageView new];
    _shipImageView.contentMode = UIViewContentModeScaleToFill;
  }
  return _shipImageView;
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
